// pages/mineDetail/mineDetail.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    mineid:1,
    category:"",
    "publishContentList":
      {
        id:0,
        category:"校园咨询",
        type:"疫情问题",
        time:"13:45",
        content:"预约了明天下午的卓尔体育馆的体测，想知道体育馆体测的入口在哪里",
        senderName:"张继理",
        sex:"男",
        status:1,
      },
  },
  onLoad:function(options){
    this.setData({
      mineid:options.id,
      category:options.category
    })
    let that=this
    var header={};
    header = { 
      'content-type': 'application/x-www-form-urlencoded'
    };
    var cookie = wx.getStorageSync("cookieKey");
    header['cookie'] = cookie;
    let cat=1
    if(this.data.category=="求跑腿"){
      cat=1
    }
    wx.request({
      url: 'http://localhost:8080/publishment/'+that.data.mineid+'/'+cat,
      method:"GET",
      header:header,
      success:function(res){
        that.setData({
          publishContentList:res.data.data
        })
      }
    })
  },
  bindBack(){
    wx.switchTab({
      url: '/pages/mine/mine',
    })
  },
})